<template>
  <ul class="comingsoony" >
   
      <li v-for="item in comingylist1">
        <router-link :to="{name:'detail',params:{'id':item.id}}">
        <div class="film-item">
          <div class="film-item-img">
            <div class="img-responsive">
              <img :src="item.poster.origin" />
            </div>
          </div>
          <div class="film-desc">
            
            <div class="film-name">{{item.name}}</div>
            <div class="film-intro">{{item.intro}}</div>
            <div class="film-premiere-date"><span>{{item.premiereAt | fliterDate}}</span>&nbsp;&nbsp;&nbsp;<span>{{item.premiereAt | nbl}}</span></div>
          </div>
        </div>
        </router-link>
      </li>
  </ul>
</template>
<script>
import $ from 'jquery';
export default {
  data:function(){
       return{
           comingylist1:[],

       }
   },
   mounted:function(){
     var url = 'http://localhost:3000/comingsoon?time=' + new Date().getTime() + '&page=1&count=20';
      var that = this;
     $.get(url).then(function(res){
       
          that.comingylist1 = res.data.films;

     })
   }
}
</script>
<style>
.film-item{
      padding-left: 15px;
    display: inline-block;
    width:100%;
    cursor: pointer;
        box-sizing: border-box;
}
.film-item-img{
  width: 60px;
    float: left;
    overflow: hidden;

}
.film-item-img img{
  width: 100%;
    transition: all 1.2s ease;
    opacity: 1;
        vertical-align: middle;
        border: 0;
        box-sizing: border-box;

}
    
.img-responsive{
  display: block;
    max-width: 100%;
    height: auto;
}
.film-desc{
    padding-left: 15px;
    display: inline-block;
    width: 75%;
}

.film-name{
      font-size: 16px;
    line-height: 32px;
    color: #000;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.film-intro{
  height: 24px;
    line-height: 24px;
    color: #8e8e8e;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    display: inline-block;
}
.film-premiere-date{
      line-height: 24px;
    color: #ffb375;
    font-size: 12px;
}


</style>
